<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>jsÌÔ±¦»ÃµÆÆ¬ÉÏÏÂ»¬¶¯Ð§¹û - 16ËØ²ÄÍø</title>
<link href="css/css.css" rel="stylesheet" type="text/css" />

<script src="js/move.js" type="text/javascript"></script>
<script type="text/javascript">
window.onload=function(){
	var oDiv=document.getElementById("div1");
	var aBtn=oDiv.getElementsByTagName("ol")[0].getElementsByTagName("li");
	var oUl=oDiv.getElementsByTagName("ul")[0];
	var now=0;
	for(var i=0;i<aBtn.length;i++){
		aBtn[i].index=i;
		aBtn[i].onclick=function(){
			now=this.index
			tab();
			}
		}
		function tab(){
			for(var j=0;j<aBtn.length;j++){
				aBtn[j].className="";
				}
			aBtn[now].className='actived';
			move(oUl,{top:-360*now});
			}
		function next(){
			now++;
			if(now==aBtn.length){
				now=0;
				}
				tab();
			}
		var timer=setInterval(next,3000);
		oDiv.onmouseover=function(){
			clearInterval(timer);
			};
		oDiv.onmouseout=function(){
			timer=setInterval(next,3000)
			}
	}
</script>
</head>
<body style="background:#aaa;">
<div id="div1">
	<ol>
    	<li class="actived">1</li>
        <li>2</li>
        <li>3</li>
        <li>4</li>
        <li>5</li>
    </ol>
    <ul>
    	<li><img src="images/1.jpg" /></li>
        <li><img src="images/2.jpg" /></li>
        <li><img src="images/3.jpg" /></li>
        <li><img src="images/4.jpg" /></li>
        <li><img src="images/5.jpg" /></li>
    </ul>
</div>
</body>
</html>
